home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / Kubuntu 8.10 / kubuntu-8.10-desktop-i386.iso / casper / filesystem.squashfs / etc / acpi / resume.d / 90-xscreensaver.sh < prev    next >
Linux/UNIX/POSIX Shell Script  |  2008-10-14  |  342b  |  14 lines

  1. #!/bin/sh
  2.  
  3. # now, we should poke xscreensaver so you get a dialog
  4. if pidof xscreensaver > /dev/null; then 
  5.     for x in /tmp/.X11-unix/*; do
  6.     displaynum=`echo $x | sed s#/tmp/.X11-unix/X##`
  7.     getXuser;
  8.     if [ x"$XAUTHORITY" != x"" ]; then
  9.         export DISPLAY=":$displaynum"
  10.         su $user -c "(xscreensaver-command -deactivate)"
  11.     fi
  12.     done
  13. fi
  14.